package org.loong.crypto.service.core.provider;

import org.loong.crypto.common.exception.CryptoException;
import org.loong.crypto.core.algorithm.HmacAlgorithm;

/**
 * HMAC Signer.
 */
public interface HmacSigner extends HmacProvider {

    /**
     * HMAC digest calculation.
     * 
     * @param algorithm the algorithm
     * @param message the message to digest
     * @return the result digest
     * @throws CryptoException the {@link CryptoException}
     */
    byte[] sign(final HmacAlgorithm algorithm, final byte[] message) throws CryptoException;
}
